package ar.com.contable.ganancias.listener;

import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;

import ar.com.contable.ganancias.editor.View;
import ar.com.contable.ganancias.model.LabelModel;
import ar.com.contable.ganancias.modelVO.ItemVO;
import ar.com.contable.ganancias.modelVO.RowVO;
import ar.com.contable.ganancias.util.Consts;
import ar.com.contable.ganancias.util.LabelsBag;
import ar.com.contable.ganancias.util.Utils;


/**
 * Provider of texts.
 * @author E420611
 *
 */
public class TableLabelProvider implements ITableLabelProvider{
 
      /**
	 * 
	 */
	private View TableLabelProvider;

	/**
	 * @param view
	 */
	public TableLabelProvider(View view) {
		TableLabelProvider = view;
	}

	public Image getColumnImage(Object element, int columnIndex){
         return null;
      }
 
	/**
	 * Get text about column.
	 */
      public String getColumnText(Object element, int columnIndex){
    	  
    	  return ((RowVO) element).getColumnText(columnIndex);
//         switch (columnIndex){
//            case 0:  
//            		if (element instanceof ItemVO){
//            			return LabelsBag.getLabelText(((ItemVO)element).getCode());
//            		}else{
//            			return LabelsBag.getLabelText(element.toString());            			
//            		}
//            
//            default:    
//            	if (element instanceof ItemVO){
//            		return (((ItemVO)element).getValue(Utils.getMonthCode(columnIndex))).toString();
//            	} else {
//            		return Consts.BLANK;
//            		
//            	}
//            	
//         }
      }
 
      public void addListener(ILabelProviderListener listener){
      }
 
      public void dispose(){
      }
 
      public boolean isLabelProperty(Object element, String property){
         return false;
      }
 
      public void removeListener(ILabelProviderListener listener){
      }
   }